using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._TurnFeatureClass
{
    /// <summary>
    /// <para>Update by Alternate ID Fields</para>
    /// <para>Updates all the edge references in turn feature classes using an alternate ID field. This tool should be used after making edits to the input line features that are referenced by the turn features to synchronize the turn features based on the alternate ID fields.</para>
    /// <para>依次使用备用 ID 字段更新所有边参照要素类。在对转弯要素所参照的输入线要素进行编辑后，应使用此工具，以基于备用 ID 字段同步转弯要素。</para>
    /// </summary>    
    [DisplayName("Update by Alternate ID Fields")]
    public class UpdateByAlternateIDFields : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public UpdateByAlternateIDFields()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_network_dataset">
        /// <para>Input Network Dataset</para>
        /// <para>The network dataset whose turn feature classes are being updated by their alternate ID fields.</para>
        /// <para>其转弯要素类正在通过其备用 ID 字段进行更新的网络数据集。</para>
        /// </param>
        /// <param name="_alternate_ID_field_name">
        /// <para>Alternate ID Field Name</para>
        /// <para>The name of the alternate ID field on the edge feature sources of the network dataset. All edge feature sources referenced by turns must have the same name for the alternate ID field.</para>
        /// <para>网络数据集的边缘要素源上的备用 ID 字段的名称。轮次参照的所有边要素源必须具有相同的备用 ID 字段名称。</para>
        /// </param>
        public UpdateByAlternateIDFields(object _in_network_dataset, object _alternate_ID_field_name)
        {
            this._in_network_dataset = _in_network_dataset;
            this._alternate_ID_field_name = _alternate_ID_field_name;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Update by Alternate ID Fields";

        public override string CallName => "na.UpdateByAlternateIDFields";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_network_dataset, _alternate_ID_field_name, _out_network_dataset];

        /// <summary>
        /// <para>Input Network Dataset</para>
        /// <para>The network dataset whose turn feature classes are being updated by their alternate ID fields.</para>
        /// <para>其转弯要素类正在通过其备用 ID 字段进行更新的网络数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_network_dataset { get; set; }


        /// <summary>
        /// <para>Alternate ID Field Name</para>
        /// <para>The name of the alternate ID field on the edge feature sources of the network dataset. All edge feature sources referenced by turns must have the same name for the alternate ID field.</para>
        /// <para>网络数据集的边缘要素源上的备用 ID 字段的名称。轮次参照的所有边要素源必须具有相同的备用 ID 字段名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Alternate ID Field Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _alternate_ID_field_name { get; set; }


        /// <summary>
        /// <para>Updated Input Network Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Network Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_network_dataset { get; set; }


        public UpdateByAlternateIDFields SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}